Enable all

Disable all

Procedural Mesh with marching squares

#Unity

#Side-Project

Description

  A continuation of Sebastian Lague's procedural planet generation tutorial . In this project, I learned how to create meshes in code by making an ocean mesh that follows the contour of the planet's land. My solution was to implement the marching squares algorithm. You divide the mesh into squares and you give the corners a value of how close it is to the ocean level. Then, you get the correct configuration of the mesh in that cell from the lookup table that has all the possible ways a cell can look like.
 The main challenge was understanding how the generation of meshes works, as well as finding the right solution. I randomly stumbled upon the square marching algorithm and realized that I could use it for this project. Implementing the algorithm was hard, but I had a lot of fun doing it.

Full project GitHub

Unity DOTS and BOIDS

#Unity

#Side-Project

Description

  Because the Unity Data Oriented Technology Stack was released, I decided to learn it by doing a project. I use the earlier learned Boids Algorithm as the problem to optimize. However, this time I use an easier space partitioning algorithm, so I can focus more on how DOTS works. The way it works is that a region in space has its hash code that is used as a key in a HashTable. The limitation is that boids interact only in the bounds of a particular cell and not in their respective perception radius.
  The main challenge I encountered was to find the right documentation to learn from. Many tutorials use deprecated functions and even workflows.

Full project GitHub

Physics Engine

#GxpEngine

#University Project

Description

  A physics engine that handles continuous collisions between circles, angled lines, and AABBs. It doesn't support rotation yet. My aim was to improve my math and physics skills, especially in vectors as it's so prevalent in game development.
 The main challenge was to solve the weird edge cases.. literally. The circles would bounce weirdly at the corners of rectangles and at the ends of segments. To solve this, I added "caps". These are circles placed at the ends of segments that have the radius set to zero.

Full project GitHub

Procedural dungeon generation and pathfinding

#GxpEngine

#University Project

Description

  A scene with an orc that moves from A to B through a procedurally generated dungeon by the shortest path. The dungeon is generated using a binary space partitioning algorithm, the rooms that "collide" will form doors that will be elongated as the rooms randomly shrink. The pathfinding is implemented using the A* algorithm.
 The main challenges were:
  How to connect the rooms? -solved with the previously mentioned collision idea
  Creating a custom min heap container for the A* implementation. I did it to further challenge myself.
  Making the node grid. I did it with a simple square fill algorithm.

Full project GitHub

Inverse Kinematics

#Unity

#Side-Project

Description

  I implemented the algorithm for spider walking in a few hours, and left it off when the spider could react to changing heights.
  The main challenge was to position the legs uniformly and to make a standing state and a walking state, so the legs don't look odd while idle.

Full project GitHub

Wave Function Collapse

#GxpEngine

#Side-Project

Description

  A window that's filled with procedurally generated tiles that must connect. It is based on the wave function collapse algorithm:
   Each tile has a superstate
   A random state is picked from the tile with the least superstates
   The rest of the cells then update their superstates based on conditions (such as every tile must connect)
   Repeat.
  The challenge I encountered was to include rotated versions of tiles in the superstates. I just added the rotated tiles as separate objects (as if they are different tiles) in the list of superstates.

Full project GitHub

Boids and Quad Trees

#GxpEngine

#Side-Project

Description

  Boids is an artificial life program, developed by Craig Reynolds in 1986, which simulates the flocking behavior of birds, and related group motion.
  The challenge was to optimize the algorithm because every boid would have to check (in the unoptimized case) every other boid for it to get the right data. This would mean an O(n^2) complexity. To solve this problem, I used the quadtree data structure. I am aware that using bins is better for this algorithm, however, I still chose quadtrees because it sounded more fun and I think I would use it more often in future projects. However, I will definitely play around with the former algorithm too.

Full project GitHub